import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import { Message } from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

Vue.config.productionTip = false

// 配置axios默认URL
axios.defaults.baseURL = 'http://localhost:8080/api/medical-crowdsourcing'
// 允许跨域请求携带凭证
axios.defaults.withCredentials = true
// 将axios添加到Vue原型中，以便在组件中使用
Vue.prototype.$http = axios
// 添加Element UI的Message组件
Vue.prototype.$message = Message

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app') 